//
//  MessageVC.m
//  teaching
//
//  Created by yishangpin2 on 15/5/8.
//  Copyright (c) 2015年 衣尚品1. All rights reserved.
//

#import "MessageVC.h"
#import "MessageTableViewCell.h"


@interface MessageVC (){
    NSMutableArray *PicArray;
    NSMutableArray *NameArray;
    NSMutableArray *MessageArray;
}


@end

@implementation MessageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    PicArray = [[NSMutableArray alloc] initWithObjects:@"头像1.png",@"头像2.png",@"头像3.png", nil];
    NameArray = [[NSMutableArray alloc] initWithObjects:@"张  莹",@"刘巧巧",@"李以峰", nil];
    MessageArray = [[NSMutableArray alloc] initWithObjects:@"教授，我有个学术问题。",@"上课的地点在哪里？",@"不好意思，路上堵车了。", nil];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 54;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellIdentify = @"Cell";

    MessageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentify];
    
    cell.name.text = NameArray[indexPath.row];
    cell.message.text = MessageArray[indexPath.row];
    cell.pic.image = [UIImage imageNamed:PicArray[indexPath.row]];
    
    return cell;
}

@end
